import _ from 'lodash-es'

// 检查权限
export function hasPermission(auth: Array<string>, roles: Array<string>) {
  if (auth.includes('*')) {
    return true
  } else {
    const res = _.intersection(auth, roles)
    return res.length > 0
  }
}
